import uuid

from rest_framework import serializers

from . import models


class VipcardSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.VipCard
        fields = ['id','cardname', 'num', 'content', 'price', 'img']


class VipuserSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.VipUser
        fields = ['id','username', 'cardname', 'cardno', 'create_time', 'daynum', 'is_open']
        extra_kwargs = {
            'cardno': {'required': False},
        }